<template>
    <div class="section_common">
        <div class="main">
            <div class="content-main">
                <div class="meeting-detail-intro" v-html="notice.content"></div>
            </div>
        </div>
    </div>
</template>


<script>
    export default {
        data() {
            return {
                notice: '',
                noticeId: 0,
                noticeDetailUrl: "/mobiles/noticeDetail",
                userId: '',
            }
        },
        created() {
            this.noticeId = this.$route.params.noticeId;
            this.userId = JSON.parse(localStorage.getItem('userInfo')).userId;
            this.getNoticeDetail(this.noticeId, this.userId);
        },
        methods: {
            getNoticeDetail(noticeId, userId) {
                this.$https.post(this.noticeDetailUrl, {
                    noticeId: noticeId,
                    userId: userId
                }).then((res) => {
                    this.notice = res.data.data.notice;
                    if (res.data.data.changeReadStatus == 1 && localStorage.getItem("haveNotReadCount")>=0) {
                        localStorage.setItem("haveNotReadCount",localStorage.getItem("haveNotReadCount")-1);
                    }
                    console.log(this.notice);
                }).catch(err => {
                    console.log(err);
                });
            },
            onClickLeft() {
                this.$router.go(-1);
            },
        },
    };
</script>
<style lang="scss" scoped>

    .main {
        background-color: white;
        .el-form {
            padding-right: 10px;
            .el-form-item {
                .el-form-item__label {
                    line-height: 16px;
                }
                margin-bottom: 5px;
            }
        }
    }

    .content-main {
        width: 100%;
        margin-top: vw(30);
        padding: vw(10) 3vw;
        box-sizing: border-box;
        text-align: left;
        font-size: vw(36);
    }

    .meeting-detail-intro {
        ::v-deep {
            img {
                width: 100%;
            }
        }
    }
</style>
